This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~Chloe Quetlutheroden 26.Mar.03 07:00 PM a Web browser Domino DesignerAll ReleasesWindows 2000
Hello
i had a small problem in lotus notes
i wrote a small dll which just displays a message (A SIMPLE JNI APPLET PROGRAM!). I called this dll in my java applet program.and when i executed using JVIEW or appletviewer its working fine but the problem is how to run this applet in dominodesigner.I followed some steps but it failed to work.they are as follows
Step 1: Created a java file
-----------------------------------------------
import lotus.domino.*;
import java.awt.*;
import java.awt.event.*;
public class SimpleJNI extends AppletBase
{
public native void greetings();
static{System.loadLibrary("SimpleJNI");}
public void notesAppletInit()
{
System.out.println("In Notes Applet Init Method");
}
public void notesAppletStart()
{
try
{
System.out.println("In Notes Applet Start Method");
new SimpleJNI().greetings();
}
catch(Exception e) { e.printStackTrace();}
}
public void paint(Graphics g)
{
g.drawString("A Simple Java applet",100,100);
}
}
-----------------------------------------------
Step 2: COmpiled the above file
Step 3: Generated a header file using javah command
Step 4: Using the generated file created a dll which just prints a message
--------------------------------------------------------------------------------
The dll consists of (headerfile + .cpp) where .cpp file consists of the following code
#include <stdio.h>
#include "SimpleJNI.h"
#include "jni.h"
JNIEXPORT void JNICALL Java_SimpleJNI_greetings(JNIEnv *env, jobject jobj){
printf("A SIMPLE JNI APPLET PROGRAM!");}
--------------------------------------------------------------------------------
Step 5: Runned through jview worked properly.
Coming to lotus notes i got some errors
---------------------------------------------------------------
Step 1: Create a new applet
Step 2: Imported applet resources(dll and .class file)
Step 3: Set the applet properties(width,height,appletname,)
Step 5: Design - > Priview in notes
Step 6: Got the following error
In Init MethodIn Start Methodjava.lang.UnsatisfiedLinkError: greetings at TestJNI.start(TestJNI.java:21) at COM.ibm.JEmpower.applet.AppletFrame.run(AppletFrame.java:467) at java.lang.Thread.run(Thread.java:466)
Conclusion:
1)Is there any process to pack the dll and class file like we do for IE(.cab) and NN(.jar).I just imported these two files like we import .jar files or .cab files
2)Do we need to copy the dll into a particular folder(ofcourse i copied dll into system32 and anyway impoorted)